﻿using System;
using System.Windows.Automation;

namespace RobotUI.Controls
{
	
	/// <summary>
	/// Base class for control classes
	/// </summary>
	public abstract class Control
	{
		protected AutomationElement _element;
		
		/// <summary>
		/// Constructor from automation element
		/// </summary>
		public Control(AutomationElement element)
		{
			if (element==null) throw new ArgumentNullException("Cannot instanciate Control, element is null");
			_element = element;
		}
		
		/// <summary>
		/// Set the Value of control
		/// </summary>
		public abstract void SetValue(string data);
		
		/// <summary>
		/// Get the Value of the control
		/// </summary>
		public abstract string GetValue();
		
		/// <summary>
		/// Click on the control with left mouse
		/// </summary>
		public abstract void Click();
		
		
		
	}
}
